@echo off
echo "====start cppcheck xlcomm===="
@echo on

cppcheck --std=c++14 xlcomm

@echo off
echo "====start build xlcomm===="
@echo on

set BUILD_TYPE=release

mkdir build
cd build
cmake -G "Visual Studio 16 2019" ..
cmake --build . --config %BUILD_TYPE%

cd ..
rm -r bin
xcopy /y third_party\lib\*.dll bin\
xcopy /y build\lib\%BUILD_TYPE%\*.dll bin\
xcopy /y build\bin\%BUILD_TYPE%\*.exe bin\
rm *.log